Video processing technique using multi-buffer video memory

ABSTRACT

In a preferred embodiment, when full-motion video data is to be captured on a hard disk, a full-motion video memory on a video controller card has its addresses segmented into four groups, where each group can store one scaled-down frame (or field) of video data. The video memory is arranged to effectively act as a four-frame, first-in first-out (FIFO) buffer. The holding time of a single frame of data (i.e., four times the conventional holding time) in the video memory is sufficient to allow for the unpredictable variations in the hard drive timing so that frames are not arbitrarily dropped by worst case timing/accessing times of the hard drive. Hence, the average bandwidth and timing of the hard drive, rather than the instantaneous worst case bandwidth and timing of the hard drive, is used when designing the system. Additionally, if the average bandwidth of the hard drive is not sufficient to capture all the frames of data being stored in the video memory, a time scaling feature is employed to selectively drop frames of data at periodic intervals to match the average frame capture rate to the rate at which frames are being stored in the video memory. Thus, the maximum capturable frame rate is realized given the particular hard drive used in the system.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is related to U.S. application Ser. No. 08/127,219,filed Sep. 27, 1993, entitled "Flexible Multiport Multiformat BurstBuffer," and related to U.S. application Ser. No. 08/136,621, filed Oct.13, 1993, entitled "Data Processing Technique for Limiting the Bandwidthof Data to be Stored in a Buffer," both applications being assigned tothe present assignee and incorporated herein by reference.

FIELD OF THE INVENTION

This invention relates to video processing techniques and, inparticular, to an improved technique for transferring video data from avideo memory to a separate storage medium, such as a hard disk, in acomputer.

BACKGROUND OF THE INVENTION

In a typical multi-media computer system, a conventional personalcomputer is augmented with a full-motion video card to displayfull-motion video images in a window on its display screen. The videoinformation may be generated by any source. Still images, such as text,may be concurrently displayed outside the video window. Such a systemoffers enormous potential for educational applications and otherinteractive applications.

The full-motion video data may be recorded on a hard disk or otherstorage medium used by the computer for later playback and display. Whenattempting to store full-motion video data on a hard disk, a problemexists in that the bandwidth of the original full-motion video data ismuch greater than the bandwidth of the conventional hard drives used inpersonal computers. Further, the unpredictable track access times forrecording on a hard disk cause the short-term bandwidth of the harddrive to be unpredictable. Accordingly, the complete original video datacannot typically be saved on a hard drive for later playback.

The system of FIG. 1 will be used to illustrate this problem and otherproblems with the existing art when attempting to store full-motionvideo data on a hard disk using a personal computer. The originalfull-motion video data may be in the form of a standard analog videosignal such as in a National Television System Committee (NTSC) formator other format. Assuming the original video data is analog, this analogsignal is then converted to a digital signal using an A/D converter 10.This digitized signal is then applied to an input of a full-motion videocontroller card 12 (which may or may not include the A/D converter 10).Such a video controller card 12 includes a full-motion video memory 14.One type of video controller card and video memory is described in U.S.application Ser. No. 08/136,621, previously mentioned.

The video controller card 12 is connected to a system bus 16. Alsoconnected to bus 16 and to an output of video controller card 12 is aconventional VGA controller and frame buffer 20. The full-motion videodata contained in the video memory 14 is multiplexed with the datastored in the VGA frame buffer 20, and this multiplexed data is appliedto a monitor. The monitor then simultaneously displays a full-motionvideo window along with other data outside the window.

The personal computer's CPU 22 is connected to the system RAM 24, andthe CPU 22 is connected to bus 16 for controlling, among other things,transfers between the system RAM 24 and the hard drive 26.

The conventional hard drive 26 is connected to bus 16 via a conventionalbuffer 28. A data transfer from RAM 24 to hard drive 26 is asynchronouswith the operation of the video controller card 12. Data is transferredto hard drive 26 by transmitting bursts of data over bus 16, and buffer28 is used to temporarily store this burst of data while the hard drive26 records the data on a rotating disk, consuming an unpredictableamount of time. Buffer 28 may have a capacity on the order of 64 Kbytes.

FIG. 2 illustrates a conventional operation of the system of FIG. 1 whenstoring full-motion video data on the hard drive 26. The full-motionvideo data is conventionally transmitted as frames of data, where eachframe stores all the pixel information needed to display a single imageon a monitor having, for example, 640×480 pixels. A typical frame rateis 30 frames per second. When this pixel data is digitized, the rate ofpixel data may be on the order of 20-30 Mbytes per second, dependingupon the digitizer used.

In a conventional NTSC format, each frame is composed of two fields ofinterlaced lines of pixels, so that each field has a period ofapproximately 1/60th of a second. The fields may be referred to as evenfields and odd fields since one field energizes even lines of pixels onthe monitor and the other field energizes odd lines of pixels on themonitor. This assumes a raster-scan type monitor is used.

Due to the extremely large bandwidth of the incoming digital video data,the video data is selectively scaled down by circuitry on the videocontroller card 12 to reduce the bandwidth of the data to make thisbandwidth compatible with the bandwidth of the video memory 14, the bus16, and the hard drive 26. The bandwidth of the hard drive 26 may be onthe order of 400-600 Kbytes per second, which is similar to thebandwidth of bus 16. Thus, the original video data must be scaled downconsiderably, both horizontally and vertically, to reduce its averagebandwidth to 600 Kbytes per second or less.

FIG. 2 illustrates five time periods T1-T5 during which time full-motionvideo is being stored in the video memory 14 and subsequentlytransferred to the hard drive 26. A single port video memory 14 ispresumed, although the problem being addressed would also arise if adual-port VRAM were used as the video memory 14. Each time period T1-T5coincides with the transmission of an even or odd field of video data.

During time T1, an even field is transmitted, scaled down, and stored inthe full-motion video memory 14 in FIG. 1.

At time T2, the even field video data already stored in the video memory14 is transferred via bus 16 to the system RAM 24. This step isnecessary since all data to be transferred to the hard drive 26 must befirst stored in the system RAM 24 and processed by the CPU 22. Duringthis time T2, the odd field of video data being transmitted by the videosource is being dropped to free up the video memory 14 for the datatransfer to RAM 24.

At time T3, a next even field of video data is stored in the videomemory 14. During this time, the bus 16 is free, and the video datapreviously transferred to the system RAM 24 is now asynchronouslytransferred via bus 16 to the hard drive 26 for storing the even fieldreceived by the video memory 14 at time T1.

This process of storing and transferring is then repeated in an attemptto capture one field per frame of full-motion video data transmitted.During this time, the data stored in the video memory 14 may bedisplayed on a monitor without requiring the use of the bus 16.

Due to the inherent recording time unpredictability of hard drive 26,the required time to fully transfer a field of video data between thesystem RAM 24 and the hard drive 26 may exceed the allocated period T3.Such unpredictability stems from the varying track/sector access timesfor the hard drive 26 and the mechanical timing variances inherent inthe hard drive 26.

Since the bus 16 is used to transfer data from the system RAM 24 to thehard drive 26 and to transfer data from the video memory 14 to thesystem RAM 24, the consecutive transfer steps shown at times T2 and T3cannot overlap since they both require the use of bus 16. Thus, if thetime for transfer of the data from the system RAM 24 to the hard drive26 during period T3 is greater than 1/60th of a second or otherwiseoverlaps the time period T2 or T4, a complete frame of video data willbe lost. Due to the unpredictability of the timing and bandwidth of thehard drive 26, unless large margins are provided between the memorytransfer steps in time periods T2 and T3 (and subsequent periods) toaccount for worst case access times by the hard drive 26, frames ofvideo data will be lost at random. Due to this random loss of frames,when this video data is later played back after capture on the harddrive 26, the displayed moving video image will be erratic and oflimited value.

The prior art has attempted to avoid this random loss of frames byeither greatly reducing the bandwidth of the video data (i.e., droppinglarge numbers of pixel bits) to reduce the time it takes to transfer onefield of data over bus 16, or periodically deleting frames (e.g., deleteevery third frame) to reduce the frame rate and, hence, increase thetime period allocated to transfer a field or frame of video data to thehard drive 26. Thus, the prior art systems are designed around the worstcase bandwidth (i.e., minimum peak bandwidth) of the hard drive 26. Suchprior art attempts to create reliable and predictable video storage andreproduction are at a great cost to the resolution and/or fluidity ofthe subsequently displayed video image.

What is needed is an improved video processing technique which does notrequire as great a reduction in bandwidth of the video signal or framerate reduction as prior art techniques and which may be implemented witha minimum of additional hardware over that described with respect toFIG. 1.

SUMMARY

In a preferred embodiment, when full-motion video data is to be capturedon a hard disk, a full-motion video memory on a video controller cardhas its addresses segmented into four groups, where each group can storeone scaled-down or compressed frame (or field) of video data. The videomemory is arranged to effectively act as a four-frame, first-infirst-out (FIFO) buffer. The holding time of a single frame of data(i.e., four times the conventional holding time) in the video memory issufficient to allow for the short-term unpredictable variations in thehard drive timing so that frames are not arbitrarily dropped by worstcase timing/accessing times of the hard drive.

The hard drive is given priority access to the system RAM so that thetransfer of a field or frame to the hard drive can take place as soon asthe hard drive is ready to accept more data. After the hard drive hascaptured a complete field or frame of data, the system RAM may thenretrieve a next field or frame from the video memory without concernthat fields or frames have been lost due to any recording delay by thehard drive.

Hence, the average bandwidth and timing of the hard drive, rather thanthe instantaneous worst case bandwidth and timing of the hard drive, isused when designing the system.

The total capacity of the video memory should be at least sufficient tostore a complete frame of pixels if the highest resolution image is tobe displayed in real time. When the video memory is switched from thedisplay mode to the capture mode, each of the four address groups isthus sufficient to store 1/4 of the original frame size. If thefour-frame FIFO capability of the video memory is used, each frame ofvideo data must be initially scaled down or compressed to 1/4 size. Thisis usually satisfactory since the video image is typically displayed ina small window on the monitor along with other data and must becompressed anyway to store the data at a high frame rate on aconventional hard drive. Accordingly, implementation of this techniquedoes not require a larger video memory than that already needed toprovide a high quality displayed image.

In a preferred embodiment, video data may be read from and written intothe same frame area in the video memory as long as the read (capture)and write (video-in) pointers have been determined to not overlap whileaccessing the same frame area. This more efficiently utilizes thecapabilities of the hard drive.

Additionally, in the preferred embodiment, if the average bandwidth ofthe hard drive is not sufficient to capture all the frames of data beingstored in the video memory, a time scaling feature is employed toselectively drop frames of data at periodic intervals to match theaverage frame capture rate to the rate at which frames are being storedin the video memory. Thus, the maximum capturable frame rate is realizedgiven the particular hard drive used in the system. Such selectivedropping of frames, rather than arbitrarily dropping frames, ensures amore fluid motion of the video image when displayed.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram of a conventional personal computerincorporating a full-motion video controller card to provide thepersonal computer with a multi-media capability.

FIG. 2 is a time-line illustrating the operation of the structure ofFIG. 1 when storing video data on a hard drive.

FIG. 3 is a block diagram illustrating one embodiment of the presentinvention incorporating a video memory storing a plurality of frames.

FIG. 4 is a conceptual view of the video memory of FIG. 3 and thepointers used to access storage locations within the memory.

FIG. 5 is a flowchart illustrating a preferred method of operation ofthe video-in data path in FIGS. 3 and 4.

FIG. 6 is a flowchart illustrating the preferred method of operation ofthe capture data path in FIGS. 3 and 4.

FIG. 7 is a flowchart illustrating the preferred method of operation ofthe display data path in FIGS. 3 and 4.

FIG. 8 is a time-line illustrating one example of the operation of thesystem of FIGS. 3 and 4.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

FIG. 3 is a block diagram illustrating the preferred embodiment videoprocessing system. Each of the functional blocks of FIG. 3 is either aconventional circuit or a circuit/software program which could beimplemented by one skilled in the art using conventional techniquesafter reading this disclosure.

The structure of FIG. 3 is used in conjunction with a conventionalpersonal computer (such as shown in FIG. 1) to process, buffer, capture,and display full-motion video data originating from a VCR, laser disc,CD ROM, television, or other video source. The structure of FIG. 3 islocated on a video controller card and essentially replaces the videocontroller card 12 in FIG. 1. Since this disclosure focuses on thearrangement of the video memory and techniques for addressing the videomemory, other aspects of a video controller card not pertinent to theinvention will not be discussed in detail. Such detail may however beobtained from U.S. application Ser. Nos. 08/127,219 and 08/136,621,previously mentioned.

The full bandwidth of digital video data originating from a video sourceis applied to a vertical and horizontal scaler 40. Scaler 40 may also bea compressor. This digital video-in data may be on the order of 20-30Mbytes per second and carry pixel data for a pixel array of up to1024×512 pixels (for high definition video) at 30 frames per second (or60 fields per second). Scaler 40 may be controlled using well knownmeans to effectively drop selected horizontal lines of pixels (such asevery other line, etc.) to reduce the vertical height of the pixel imageand hence reduce the average bandwidth of the video data. Scaler 40 mayalso be controlled to drop pixel data within the horizontal lines ofpixels to reduce the horizontal width of the pixel image and to furtherreduce the bandwidth of the video data. Scaler 40 may also include aninterpolator to regenerate pixel data rather than simply dropping data.Additionally, scaler 40 may also compress the pixel data to effectivelyreduce the amount of bits per frame without losing information. Acompatible decompressor would then be used at the output of the displaypath to decompress the data before the data is displayed. Bits, lines,or fields of video data may be dropped by scaler 40 by forcing theoutput of scaler 40 to a specified level (e.g., zero) at the propertime. Timing of the scaler 40 may be obtained from the horizontalsynchronization pulse, vertical synchronization pulse, and other clockinformation provided by the video source signal using well knowntechniques.

In a preferred embodiment, filtering of the incoming pixel data isperformed prior to scaling to controllably band limit the video image sothat dropping pixel data has less of an impact on the video image whendisplayed.

If the highest quality image is to be displayed, no scaling will beperformed by scaler 40, and the system will be required to processincoming video data at the highest bandwidth. (This assumes that nocompression is used.)

The output of scaler 40 is applied to a first-in first-out (FIFO) buffer42 for temporary storage. Well known packing and synchronizationcircuitry are used to interface the clocking of the scaled video datawith the local clocking of the FIFO buffer 42. This FIFO buffer 42 andsynchronization circuitry is described in detail in the copending U.S.application Ser. No. 08/127,219. In the preferred embodiment, this FIFObuffer 42 forms a portion of a cache memory.

An optional detector and scaler control circuit 43 detects an overflowof bits in FIFO buffer 42 and automatically controls scaler 40 to scaleback the video data until the bandwidth of the video data outputted fromscaler 40 matches the bandwidth of the video memory 48. Such a controlcircuit 43 is described in greater detail in application Ser. No.08/136,621.

A decision circuit 44 determines the amount of space available in FIFObuffer 42 for receiving additional video data. The decision circuit 44also requests access to the video memory 48, acting as a full-motionvideo buffer, to download data in the FIFO buffer 42 to prevent FIFObuffer 42 from overflowing.

A second decision circuit is included in the decision/pointer block 46.Block 46 also includes a video-in address pointer which provides anaddress for each of the pixel data bytes for storage into the videomemory 48. The pixel data will be stored in sequential locations of thevideo memory 48. The address pointers identified in FIG. 3 will bediscussed in greater detail later. The second decision circuit in block46 detects whether the address indicated by the video-in pointer iswithin an address group A, B, C, or D which is already being accessed byanother pointer. If so, the video-in pointer is denied access to thataddress group unless it is determined that the pointers will not overlapif the video-in pointer is granted access. This determination isdescribed in greater detail later.

The decision/pointer circuit 46 also inserts a time stamp at thebeginning of each frame of data to effectively identify the timeseparation between sequential frames written into the video memory 48.

A time scale control circuit 49 controls the decision/pointer block 46to drop a field or frame in order to reduce the rate of frames beingstored in video memory 48. Additional detail of this circuit will beprovided later.

An arbitration and control circuit 50 determines whether a request foraccess by one of the decision circuits in blocks 46, 51, and 58, shouldbe granted, depending on the availability of the video memory 48 and thepriority assigned to each of the decision circuits. The decisioncircuits in blocks 46, 51, and 58 are assigned priorities 2, 1, and 3,respectively. Arbitration circuits are well known and will not bediscussed in detail. Additional detail regarding a preferred arbitrationcircuit is discussed in the copending application Ser. No. 08/127,219.

As mentioned above, the video data for display or capture is initiallystored in the video memory 48. To now access this video data for displayon a monitor, a decision/pointer circuit 51 requests access to the videomemory 48 when it has been determined by decision circuit 52 that FIFObuffer 54 must be refilled in order to maintain a flow of pixel data tothe display. The operation of decision/pointer circuit 51 is similar tothe operation of decision/pointer circuit 46. Once the request isgranted, a burst of video data is outputted from the video memory 48into FIFO buffer 54. The decision/pointer circuit 51 also includes adisplay pointer for sequentially addressing the pixel data stored invideo memory 48 for immediate display. Such sequential address circuitryis conventional and will not be discussed in detail herein.

The decision/pointer circuit 51 may also provide a vertical zoom orexpander capability by accessing the same line of pixels two or moreconsecutive times in order to increase the vertical height of thedisplayed image to be that selected by the user. The decision/pointercircuit 51 may also access the same field frame of data repeatedly tomake up for fields/frames dropped during time scaling of the frame rate.

The video data in FIFO buffer 54 is outputted to a conventional unpackerand synchronization circuit for interfacing the local clocking of theFIFO buffer 54 with the display clock. The outputted pixel data is thenapplied to a horizontal expander 56. This expander 56 may also providean interpolator function as well. The expander 56 inserts pixel data,which may be interpolated data or duplicates of pixel data, to increasethe horizontal width of the pixel image. Control of this horizontalexpander 56 is not relevant to this disclosure, but is described indetail in U.S. application Ser. No. 08/136,621.

Data is outputted from the expander 56 in accordance with a displayclock and subsequently converted to an analog signal for presentation toa video monitor for display of the data. The timing of this video dataapplied to the monitor is described in greater detail in U.S.application Ser. No. 08/136,621.

When it is desired to capture the video data stored in video memory 48on a hard disk or other recording medium, a decision/pointer circuit 58requests access to the video memory 48 and a capture pointer generatessequential address signals to access the video data to be captured. Inthe preferred embodiment, the request for access to the video memory 48by the decision/pointer circuit 58 is given a priority 3 request sincethe downstream memory devices may be stalled without losing data.

Decision circuit 60 requests access to the video memory 48 when decisioncircuit 60 determines that FIFO buffer 62 is becoming empty.

A FIFO buffer 62 provides temporary storage of the data downloaded fromthe video memory 48. Data from FIFO buffer 62 is then applied to thesystem bus for storage in the system RAM.

As previously described, the unpredictable hard disk recording time dueto sector seek and rotational delay inherently causes the time it takesto capture a full field of video data to be variable and unpredictable.In the conventional prior art, if the system RAM could not transfer anentire field or frame to the hard drive during the time allocated (e.g.,1/60th of a second), then a field or frame would be completely lost,resulting in a captured motion video image being of unpredictablequality. Additionally, in the conventional prior art, if priority weregiven to transferring all frames of data from the video memory to thesystem RAM, then the hard drive would be forced to wait until thetransfer was complete before recording the data on its hard disk. Thus,the maximum throughput of the hard drive is not realized in the priorart. Using the prior art techniques, the captured motion video image mayhave an arbitrary number of consecutive frames deleted without theuser's knowledge, causing the resulting displayed image to move in ajerky fashion. It is undesirable to capture only a portion of a framesince this would result in portions of two frames being simultaneouslydisplayed.

The present invention enables reliable capturing of the video data on ahard drive or other recording medium to achieve a predictable videoquality when played back, without setting the parameters of the systemto accommodate the worst case bandwidth and recording times of therecording medium. Using the present invention, the hard drive is allowedto run at its full throughput, since the hard drive does not have towait for any video memory to system RAM transfers to be completed beforerecording a frame on its disk.

In one embodiment of the present invention, the video memory 48, whichmay be a VRAM, a DRAM, or the equivalent, is effectively transformedinto a 4-frame FIFO buffer when the system is set to capture video dataon a hard drive or equivalent recording medium.

The video memory 48 in FIG. 3 and the pointers in blocks 46, 51, and 58are shown in greater detail in FIG. 4.

The preferred embodiment video memory 48 has a capacity for storingpixel data for a 1024×512 pixel array on a high resolution monitorscreen. Accordingly, for the highest quality displayed image, all pixeldata transmitted in a frame is temporarily stored in the video memory 48for subsequent display at 30 frames per second. When the user desires tocapture the highest quality image which can be captured by therelatively low bandwidth hard drive, the original video data must becompressed or, alternatively, some of the resolution of the originalimage must be sacrificed. In the capture mode, the particular systemembodiment of FIG. 3 is controlled to scale down the original image to1/4 its original size, using scaler 40, such that each frame (or field)now consists of pixel data for an array of 512×256 pixels. Such controlof scaler 40 may be accomplished using conventional techniques. Thereduction (or compression) of the amount of data per frame period to512×256 pixels allows the video memory 48 to store four complete framesor fields of video data in four address groups A, B, C, and D. Any sizevideo memory 48 can be used while using this technique and any number ofaddress groups may be used, depending upon the requirements of thesystem and the application.

Referring to FIG. 4, the video-in address pointer 70 (which may be acounter) in decision/pointer block 46 (FIG. 3) sequentially accessesstorage locations in video memory 48 for storage of the incoming videodata. If one field per address group A-D were to be stored (instead of aframe), pointer 70 would sequentially access storage locations startingfrom the top of the video memory 48 in FIG. 4, representing memoryaddress 0, down to the bottom of the video memory 48, representing amaximum memory address of, for example, 768K (assuming a 768 Kbyte videomemory 48). The pointer 70 then wraps around to the lowest memoryaddress 0 at the top of the video memory 48. If one frame (twointerlaced fields) per address group A-D were to be stored, pointer 70would sequentially address all even pixel line addresses in a singleaddress group AD then go back and address all odd pixel line addressesin the same address group to store the two interlaced fields of a singleframe.

Ideally, all the pointers in FIG. 4 are sequenced at the same averagerate over a period of four frames to achieve the maximum efficiency ofthe system and the maximum capturing of the video data.

The video-in pointer 70 sequences at a rate required to store the scaled(or compressed) fields/frames in the video memory 48 at a frame ratecontrolled by the time scale control 49. Access to video memory 48 iscontrolled by the arbitration and control circuitry 50, and thesequencing of the video-in pointer 70 is halted if the decision/pointer46 is not granted access to the video memory 48. In the frozen stateexample of FIG. 4, it is assumed that the video-in pointer 70 has storedslightly more than three frames of pixel data in video memory 48.

Display pointer 72 provides sequential address signals for reading outsequential frames (or fields) of video data from the video memory 48 sothat this data may be displayed on a monitor. Since the display pathshown in FIG. 3 has a relatively high throughput, there is no difficultyencountered in outputting for display 512×256 pixels per display frameperiod from video memory 48.

The capture pointer 74 in FIG. 4 is located within decision/pointerblock 58 in FIG. 3 and sequentially accesses video data in the videomemory 48 for transfer to the computer's system RAM (such as RAM 24 inFIG. 1) via the system bus 16 (FIG. 1). The video data stored in thesystem RAM is then asynchronously transferred to the hard drive (such ashard drive 26 in FIG. 1) via the system bus 16, using conventionaltechniques. As previously described, when the bus 16 is being used totransfer the video data to the hard drive, video data in the videomemory 48 cannot be transferred to the system RAM. This time that thebus 16 is being used to transfer a frame or field of data to the harddrive is unpredictable due to the unpredictable recording speed of thehard drive. Thus, the progression of the capture pointer 74 will beunpredictable since the bus 16 must first be freed up before the capturepointer 74 can resume sequencing.

The four address groups A-D in the video buffer 48 accommodate temporaryand unpredictable delays in the capture pointer 74 sequencing throughthe address locations. For example, in FIG. 4, sequential frames 1, 2,and 3 have already been written into the video memory 48 in accordancewith the progression of the video-in pointer 70. However, due to anunpredictable delay in the transfer of a previous frame from the systemRAM to the hard drive, the system bus was not available to transfer anew frame to the system RAM until two frame periods (e.g., 2/30th of asecond) later. Hence capture pointer 74 was stalled during this periodthat the system RAM could not store additional data. In the past, thisunpredictable delay would have required the arbitrary dropping of one ormore frames. In the technique illustrated in FIG. 4, however, since thevideo-in pointer 70 and capture pointer 74 are not accessing the sameframe simultaneously, the delayed capture pointer 74 may access videodata from the previously stored frame 2 while the video-in pointer 70 isstoring video data for a new frame 4 into the video memory 48.

Similarly, the display pointer 72 may access any of the frames 1-4 aslong as the display pointer 72 does not overtake the video-in pointer70.

Since data to be transferred is bursted at high rates between the videomemory 48 and the various FIFO buffers, each of pointers 70, 72, and 74do not sequence at steady rates, and control circuitry must be used toensure that the capture pointer 74 and display pointer 72 do not crossthe video-in pointer 70. If such were the case, a portion of a displayedframe would be from a different period in time, creating an undesirabledisplayed image. To ensure this event does not happen, in oneembodiment, the video-in pointer 70 is prevented from entering into anaddress group A-D during the time that the capture pointer 74 isaccessing that same address group. The particular address group beingaccessed by a pointer is known by detecting the two most significantbits (MSB) of the pointer address signals. If the two MSB's of thepointers 74 and 70 match, then both pointers require access to a sameaddress group A-D.

In a preferred embodiment, the video-in pointer 70 may enter the sameaddress group A-D being accessed by the capture pointer 74 as long asthe capture pointer 74 is beyond a critical address in that addressgroup A-D. This critical address in each address group is illustrated bya dashed line 76. The critical address is set based upon which pointersare requesting access to the same address group. Using this technique,the video-in pointer 70 is prevented from crossing over the displaypointer 72 or capture pointer 74 even though all pointers may beaccessing a same address group. For example, if the capture pointer 74is nearing the end of address group B, the video-in pointer 70 will beallowed to enter that same address group B since it is presumed that thecapture pointer 74 will be reading the next address group C by the timethe video-in pointer 70 reaches the bottom address in address group B.Similarly, if the video-in pointer 70 is writing a frame (interlacedeven and odd fields) into address group B, the capture pointer 74 ordisplay pointer 72 will not be allowed to enter address group B until itis detected that pointer 70 has gone beyond a predetermined odd pixelline address (a critical address). Accordingly, the critical addressdesignated by line 76 is set at an address where there is a virtualcertainty that pointer 70 will not overlap pointer 74 or 72.

Well known types of depth counters are used to detect the position of apointer within an address group. A depth counter, for example, may beinitially loaded with a critical address and decremented one count foreach clocking of the capture pointer 74 after pointer 74 has entered anaddress group. Prior to the video-in pointer 70 entering into thataddress group, the count in the depth counter is then detected todetermine whether the capture pointer 74 has gone beyond the criticaladdress before allowing the video-in pointer 70 to begin accessingstorage locations within that address group. If the pointer 74 has notgone beyond the critical address, then the video-in pointer 70 isblocked from accessing any addresses within that address group since itis presumed that the video-in pointer 70 will overtake the capturepointer 74 and produce an undesirable video display.

One example of the operation of the preferred video processing system issummarized in the flowcharts of FIGS. 5, 6, and 7.

If the system is in a display-only mode, the entire video memory 48 maybe used to temporarily store a single frame or field of video data at ahigh bandwidth for providing a high resolution displayed image of, forexample, 1024×512 pixels per frame at 30 frames per second. Theflowcharts of FIGS. 5-7 are initiated upon a user selecting a capturemode of the video data in step 1 of FIG. 5.

In step 2, in order to accommodate the relatively low bandwidth andtiming variations in the hard drive, the scaler 40 in FIG. 3 iscontrolled to reduce or compress the number of bytes per frame ofincoming video data so that pixel data for a single frame may be storedin each of the four address groups A-D of the video memory 48 shown inFIG. 4. Assuming the original video data presented an image in the formof 1024×512 pixels, the scaler 40 would reduce this image to 512×256pixels per frame.

In step 3, the decision/pointer circuit 46 is controlled by the timescale control 49 to reduce the frame rate to a predetermined amount, ifnecessary, to that required (e.g., from 30 frames/second to 27frames/second) to avoid arbitrarily dropping frames due to throughputlimitations of the system. This time scaling may be set by the user orperformed automatically by the time scale control 49 detecting theunintentional dropping of frames and then incrementally lowering theframe rate until frames are not unintentionally dropped. This ensuresthat the displayed image will appear fluid.

The intentional dropping of a field or frame due to time scaling in step3 increments the time scale control 49 (FIG. 3) by one unit in steps 4and 5.

In step 6, the decision circuit in block 46 of FIG. 3, requests access,as appropriate, to the video memory 48 to store a field or frame of dataafter determining that the particular address group A-D to be accessedis available. This requires a determination that any other pointeraccessing the same address group has gone beyond the critical address 76(FIG. 4). If access to the video-in pointer 70 is denied, then thefield/frame must be dropped, and the time scale control 49 is notincremented (i.e., dropped frame does not affect control of frame rate).

In step 7, it is assumed that the video-in pointer 70 request for accesshas been granted by the arbitration and control circuitry 50.

In step 8, a time stamp is inserted by the decision/pointer circuit 46into the video data stream at the beginning of each frame to identifythe time separation between consecutive frames stored. A verticalsynchronization pulse provided by the video source identifies thebeginning of a new frame. This time stamp is generated by an 8-bitcounter clocked in accordance with the vertical sync pulse. Thus, eachcaptured frame has a header with an 8-bit time stamp.

When the captured frames are played back, the number of dropped framesbetween recorded frames may be detected by reading the time stamps, andthese captured frames may be repeated as necessary (or interpolatedframes may be inserted) to fill in the gap between the captured frames.This places the video image in synchronization with the captured soundtrack which has also been recorded on the hard disk using conventionaltechniques along with the video data. The sound track is separated outfrom the original analog video signal at the front end of the systemusing a well known demodulator circuit.

In step 9, the video-in pointer 70 is then sequentially incremented tostore the time stamp and the frame data in the video memory 48.

After the successful recording of a frame or field of data in the videomemory 48, the time scale control 49 (FIG. 3) is then incremented by oneunit. The magnitude of this unit depends on the desired reduction of theoriginal frame rate. The time scale control 49 controls thedecision/pointer circuit 46 to store a frame or field each time theaccumulated count in the time scale control 49 becomes effectively zerowith a carry. This time scale and incrementing process is illustrated inFIG. 8 using a unit size of 1/2 to control the decision/pointer circuit46 to store every other field. As seen in FIG. 8, the dropping of field5 in step 3 of FIG. 5 causes the time scale control 49 to not beincremented. Thus, the next field (field 6) is stored and ultimatelycaptured.

Reducing the frame rate prevents the video-in pointer 70 from gettingtoo far ahead of the capture pointer 74. The reduction in the frame ratemay be incrementally controlled or controlled by a user until no framesare unintentionally dropped.

Accordingly, the frame rate is controlled to allow the hard drive tocapture as much video data as it is capable of capturing. The periodicdeletion of frames at predetermined intervals will be less noticeable tothe user than the sporadic dropping of frames.

FIG. 6 illustrates the operation of the capture pointer 74 andassociated circuits. In step 1, the user selects the capture mode.

In step 2 of FIG. 6, the decision/pointer circuit 58 of FIG. 3 requestsaccess to the next address group A-D for transferring a field or frameof data to the system RAM. The determination of whether another pointeris beyond the critical address is also made.

If a request for access is granted in step 3, the stored time stampfollowed by a frame of data is then transferred in steps 4 and 5 fromthe video memory 28 to the system RAM. A hard drive then asynchronouslyrecords the data stored in the system RAM at the maximum throughput ofthe hard drive until the frame has been completely transferred.

FIG. 7 briefly illustrates the operation of the display pointer 72 andrelated circuits.

In step 1 of FIG. 7, a vertical sync pulse derived from the video sourceis detected. In response to this sync pulse, the decision/pointercircuit 51 requests access to the frame stored in video memory 48 whichhas been most recently released by the video-in pointer 70. Thedetermination of whether another pointer accessing the same addressgroup A-D is beyond the critical address is also made.

By accessing the most recently released frame rather than automaticallyaccessing the stored frames sequentially, stored frames may be desirablyjumped so that the display pointer 72 does not lag too far behind thevideo-in pointer 70 even if the display clock is slow.

FIG. 8 helps to additionally describe certain benefits of the inventiveprocess. FIG. 8 illustrates the fields that have been captured on thehard drive. The time stamps (numbers within squares) associated with thecaptured fields are placed in a header at the beginning of each field ofvideo data captured. The time stamp is determined by how many fieldswere transmitted since the previous stored field. The absolute fieldnumber is determined by accumulating the time stamps.

Ideally, the odd fields of a frame are intentionally dropped to maintainthe full 30 frame per second rate and to provide a time window for thedata stored in the video memory 48 to be transferred to the system RAMfor capture. As seen by FIG. 8, the hard disk did not capture field 5due to the system blocking the video-in pointer 70 access to the videomemory 48 in step 6 of FIG. 5 when this field 5 was to be stored in thevideo memory 48. However, once the capture pointer 74 had progressed tothe next addressing group for accessing a next field for capture, thevideo-in pointer 70 was able to then gain access to the addressing groupthat the capture pointer 74 had just exited. Thus, the next field ofvideo data (field 6) was written into the addressing group for latercapture by the hard disk.

As seen by FIG. 8, although the even field 5 was dropped, this field 5is essentially a duplicate of odd field 6 which was captured. Hence, noframes have been lost at this point.

The above discussion of FIG. 8 has assumed that one field of each frameis stored in one of the four addressing groups A-D in the video memory48 shown in FIG. 4. In such a case, both the capture pointer 74 and thevideo-in pointer 70 are sequentially incremented to sequentially addressthe storage locations of the video memory 48. This mode of capture isreferred to as the field mode. In a preferred embodiment, a second modeis offered to the user, called the frame mode. In the frame mode, twointerlaced fields of video data are filtered and scaled so as to bestored in one of the address groups A-D within the video memory 48 shownin FIG. 4. This frame mode offers a higher resolution image. In theframe mode, the even lines followed by the odd lines of the pixel datamust be stored in a single address group to create a single frame.

A drawback of the frame mode is that if a frame is dropped, there is noway to recapture it, in contrast to the example of FIG. 8 where, in thefield mode, an even field may be drop and the subsequently captured oddfield effectively replaces the dropped even field.

An important advantage of this invention, besides enabling the maximumamount of video data to be captured given a hard drive's capability, isthat the data which is captured is also that data seen on the display.

If enhanced resolution were desired, an increased video memory 48 sizemay be used so that less scaling by scaler 40 would be necessary inorder to fit a field or a frame size into each addressing group A-D ofthe video memory 48. If capturing video data at a higher frame rate andhigher resolution were required, additional address groups would beprovided in the video memory 48.

While particular embodiments of the present invention have been shownand described, it will be obvious to those skilled in the art thatchanges and modifications may be made without departing from thisinvention in its broader aspects and, therefore, the appended claims areto encompass within their scope all such changes and modifications asfall within the true spirit and scope of this invention.

What is claimed is:
 1. A method for storing video data in a video memoryand retrieving data from said video memory for storage in a rotatingdisk of a disk drive, said video memory being sized to store at least aframe of video data from a video source in a first mode of operation,said method comprising the steps of:switching from said first mode ofoperation to a capture mode of operation for recording video data onsaid rotating disk, causing said video memory to be segmented into aplurality of address groups comprising at least a first address groupand a second address group; selecting a first address in said firstaddress group of said video memory, using a video-in pointer, forstoring incoming video data from a video source, said first addressgroup being capable of storing a first frame of video data; andselecting a second address in said second address group of said videomemory, using a capture pointer, for retrieving video data for storagein said disk drive, said second address group containing a second frameof video data previously stored in said second address group using saidvideo-in pointer, said second address group for allowing said disk driveto retrieve frames of video data from said video memory at a variablerate which is different from a rate that frames of said incoming videodata are stored in said video memory.
 2. The method of claim 1 whereinsaid first frame and said second frame each comprise one field of videodata.
 3. The method of claim 1 wherein said first frame and said secondframe each comprise two fields of video data.
 4. The method of claim 1wherein said disk drive comprises an input terminal connected to a bus,said bus being connected to an output of said video memory, said busalso being connected to an input and output of a random access memory(RAM), wherein said video data to be transferred from said video memoryto said rotating disk must first be stored in said RAM via said bus andthen transferred from said RAM to said disk drive for storage of saidvideo data on said rotating disk.
 5. The method of claim 1 furthercomprising a video-out pointer for addressing any address group of saidvideo memory for displaying video data contained in said any addressgroup.
 6. The method of claim 1 wherein a capture clock for controllingsequencing of said capture pointer is asynchronous with a video-in clockfor controlling said video-in pointer.
 7. The method of claim 1 furthercomprising the step of addressing said first address group using saidcapture pointer for retrieving said video data from said first addressgroup while said first address group of said video memory is also beingaddressed by said video-in pointer for storing said incoming video datain said first address group, only if said video-in pointer has passed acritical address in said first address group which ensures said video-inpointer will not overlap said capture pointer also addressing said firstaddress group.
 8. The method of claim/wherein said capture pointer isprevented from entering an address group which is being accessed by saidvideo-in pointer until said video-in pointer has entered a next addressgroup.
 9. The method of claim 7 further comprising the step ofaddressing said second address group using said video-in pointer forstoring said incoming video data in said second address group while saidsecond address group of said video memory is also being addressed bysaid capture pointer for retrieving video data for storage in said diskdrive, only if said capture pointer has passed a critical address insaid second address group which ensures said video-in pointer will notoverlap said capture pointer also addressing said second address group.10. The method of claim 9 wherein said video-in pointer is preventedfrom entering an address group which is being accessed by said capturepointer until said capture pointer has entered a next address group. 11.The method of claim 1 wherein, when said video memory is switched tosaid capture mode, said video memory is segmented into at least twoaddress groups, each address group containing a single frame ofscaled-down video data.
 12. The method of claim 1 wherein, when saidvideo memory is switched to said capture mode, said video memory issegmented into at least four address groups, each address groupcontaining a single frame of scaled-down video data.
 13. The method ofclaim 1 wherein, when said video memory is switched to said capturemode, video data from said video source is reduced to provide less dataper frame of video information so that each frame may be completelystored in a single address group of said video memory.
 14. The method ofclaim 1 further comprising the step of reducing a frame rate of saidvideo data in order to ensure that said capture pointer will not beoverlapped by said video-in pointer when addressing said video memory.15. The method of claim 1 wherein said video-in pointer is preventedfrom entering an address group which is being accessed by said capturepointer until said capture pointer has entered a next address group. 16.The method of claim 1 wherein said capture pointer is prevented fromentering an address group which is being accessed by said video-inpointer until said video-in pointer has entered a next address group.17. The method of claim 1 wherein a time stamp is stored in an addressgroup along with a frame of video data to identify a proper sequence offrames when storing said video data in said rotating disk.
 18. Themethod of claim 1 further comprising a video-out pointer for retrievingvideo data from an address group in said video memory for displayingsaid video data on a display screen, said video-out pointer beingcontrolled by a vertical synchronization pulse to access an addressgroup in said video memory which has most recently been exited by saidvideo-in pointer.
 19. The method of claim 1 further comprising the stepsof:determining whether said video-in pointer is beyond a first criticaladdress, said first critical address being an address selected to ensurethat said capture pointer cannot overlap said video-in pointer;if saidvideo-in pointer is not beyond said first critical address,stalling saidcapture pointer and returning to said step of determining whether saidvideo-in pointer is beyond said first critical address, otherwise, ifsaid video-in pointer is beyond said first critical address, advancingsaid capture pointer to a next address.
 20. The method of claim 1,wherein said video-in pointer may enter said second address group beingaccessed by said capture pointer only if said capture pointer is beyonda second critical address in said second address group, said secondcritical address selected to ensure that said video-in pointer cannotoverlap said capture pointer.